package com.lelouch.bestpractice.mongorepository.tools;

import com.lelouch.bestpractice.mongorepository.domain.WetlandBasicEntity;
import net.sf.cglib.beans.BeanCopier;

/**
 * 对象复制测试
 *
 * @author lcy
 * @create 2018-09-15 16:15
 */
public class BeanCopierTest {


    public static void main(String[] args) {
        WetlandBasicEntity wetlandBasicEntity1 = new WetlandBasicEntity();
        WetlandBasicEntity wetlandBasicEntity2 = new WetlandBasicEntity();
        wetlandBasicEntity1.setId("111");
        wetlandBasicEntity2.setWlin_type("湿地");
        BeanCopier beanCopier = BeanCopier.create(WetlandBasicEntity.class, WetlandBasicEntity.class, false);
        beanCopier.copy(wetlandBasicEntity1,wetlandBasicEntity2,null);
        System.out.println(wetlandBasicEntity1);
        System.out.println(wetlandBasicEntity2);
    }
}
